import {request} from "../../utils/request"
import type {loginResponseType,userFindType,userFindAllType} from "../../modal/user";
//查询用户列表
export let UserFind= (params:object)=>{
	return request.postRequest<userFindType>("SchoolSys/user/find",params)
}
//查询所有用户
export let UserFindAll= ()=>{
	return request.postRequest<userFindAllType>("SchoolSys/user/findAll")
}
//添加用户
export let adduser= (params:object)=>{
	return request.postRequest<undefined>("SchoolSys/user/add",params)
}
//修改用户
export let updateuser= (params:object)=>{
	return request.postRequest<undefined>("SchoolSys/user/update",params)
}
//删除用户
export let delateuser= (params:object)=>{
	return request.postRequest<undefined>("SchoolSys/user/del",params)
}
//用户登录
export let Login= (params:object)=>{
	return request.postRequest<loginResponseType>("SchoolSys/user/login",params)
}
//用户登出
export let LoginOut= (params:object)=>{
	return request.postRequest<undefined>("SchoolSys/user/logout",params)
}
// 根据用户名和权限查询
export let searchUser= (params:object)=>{
	return request.postRequest<userFindType>("SchoolSys/user/findByName",params)
}
// 查询用户权限---添加功能的复选框
export let RolesList= (params:object)=>{
	return request.postRequest("SchoolSys/role/findAll",params)
}
// 用户角色
// 查询用户权限
export let AllRolesList= (params:object)=>{
	return request.postRequest<userFindType>("SchoolSys/role/find",params)
}
// 根据权限名查询--搜索
export let findRoleByName= (params:object)=>{
	return request.postRequest<userFindType>("SchoolSys/role/findByName",params)
}
// 添加权限
export let addRoles= (params:object)=>{
	return request.postRequest<userFindType>("SchoolSys/role/add",params)
}
// 删除权限
export let delRoles= (params:object)=>{
	return request.postRequest<userFindType>("SchoolSys/role/del",params)
}
// 修改权限
export let updateRoles= (params:object)=>{
	return request.postRequest<userFindType>("SchoolSys/role/update",params)
}